﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using System.Linq;

namespace LolLauncher
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
[DllImport("kernel32.dll")]
        internal static extern IntPtr LoadLibrary(String dllname);

[DllImport("kernel32.dll")]
internal static extern IntPtr GetProcAddress(IntPtr hModule, String procname);


        private void button1_Click(object sender, EventArgs e)
        {
            IntPtr user32 = LoadLibrary(@"D:\Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\0.0.0.249\deploy\launcher.maestro.dll");
           IntPtr procaddr = GetProcAddress(user32, "MessageBoxW");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            GetLolClientExe();
        }

        private string GetLolClientExe()
        {
            return "";// new DirectoryInfo(".\\RADS\\projects\\lol_air_client\\releases\\").GetDirectories().OrderBy(x => x.Name).Last().ToString();
           
        }

        private string GetLeagueOfLegendsExe()
        {
            return "";// new DirectoryInfo(".\\RADS\\projects\\lol_game_client\\releases\\").GetDirectories().OrderBy(x => x.Name).Last().ToString();
        }
    }
}
